Function: CallbackChain

CALL:

CallbackChain(obj, field, callback, priority)

DESCRIPTION:

Add an extra callback to an object. This is for example useful in combination with zoomtool

INPUT:

obj any
handle of object to which an extra callback has to be added.
field any
string with fieldname of callback, e.g. 'keypressfcn'.
callback any
Any valid callback, that is:
    String (for eval)
    Function pointer (for feval)
    Cell array, where element 1 is function pointer

priority any
'first', {'last'}, 'drop'
if 'first' put this callback first in the chain.
if 'last' put this callback last in the chain.
if 'drop' (Not implemented yet!!)  find callback function with
specific signature and if present, remove it from the callback
chain.

OUTPUT:

     no direct output
  
  EXAMPLE 1: